<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAppErrorLogTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('error_log', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->text('path', 65535)->nullable();
			$table->string('code',20)->default(0)->comment('错误码');
			$table->text('msg', 65535)->comment('错误信息');
			$table->string('file')->default('')->comment('错误文件');
			$table->string('line')->default('')->comment('错误行号');
			$table->dateTime('create_time')->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('app_error_log');
	}

}
